package com.vmj.test.example.natives;


import com.vmj.test.example.MyObject;

/**
 * Created by yangshoujun on 2017/9/16 下午11:48.
 */
public class Objects {

    public static void main(String[] args) {

        String s1 = "abcd";
        String s2 = "abcd";

        System.out.println("s1 hashCode: " + s1.hashCode());
        System.out.println("s2 hashCode: " + s2.hashCode());
        System.out.println("s1 equal s2? " + (s1.equals(s2)));

        MyObject myObject = new MyObject();
        myObject.instanceVar = 100;

        MyObject clone = (MyObject) myObject.clone();
        System.out.println("clone.instanceVar: " + clone.instanceVar);
    }
}
